<script src="<?php echo base_url() ?>commons/tablas/media/js/jquery.js" type="text/javascript"></script>
<script src="<?php echo base_url() ?>commons/tablas/media/js/jquery.dataTables.js" type="text/javascript"></script>
<script src="<?php echo base_url() ?>commons/tablas/extras/TableTools/media/js/ZeroClipboard.js" type="text/javascript"></script>
<script src="<?php echo base_url() ?>commons/tablas/extras/TableTools/media/js/TableTools.js" type="text/javascript"></script>

<style type="text/css" title="currentStyle">
			@import "<?php echo base_url() ?>commons/tablas/media/css/demo_page.css";
			@import "<?php echo base_url() ?>commons/tablas/media/css/demo_table.css";
                        @import "<?php echo base_url() ?>commons/tablas/extras/TableTools/media/css/TableTools.css";
		</style>
<script type="text/javascript">
    var t=jQuery.noConflict();
			t(document).ready(function() {
				t('#example,#example1').dataTable( {
					"sPaginationType": "full_numbers",
                  "sDom": 'T C lfrtip', 
                    "oTableTools": { 
                    "sSwfPath": "<?php echo base_url() ?>commons/tablas/extras/TableTools/media/swf/copy_csv_xls_pdf.swf", 
                    "aButtons": [ 
                    "xls",], 
                    },
               } );
	} );
</script>

<div id="buscar1"  align="center">

    <form class="well form-search" action="<?php echo base_url() . "admin.php/coutas/presearch/".$ide_per ?>" method="post" >
        <div class="control-group">
            <label class="control-label" for="select01">PERIODO ACTUAL</label>
            <div class="controls ">
                <select name="ide_per" class="span3" autofocus
                        ONCHANGE="javascript:enviar(this.options[this.selectedIndex].value, '<?php echo (base_url()) . "admin.php/coutas/inicio" ?>');">
                            <?php
                            if ($ide_per == -1)
                                echo ("<option value='-1' selected>Seleccionar Periodo</option>");
                            foreach ($periodos as $i => $per) {
                                echo ("<option value='" . $per["ide_lec"] ."'".($per['ide_lec'] == $ide_per ? " selected" : " ").">");
                                echo ($per["descripcion_lec"] . "</option>");
                            }
                            ?>
                </select>
                <?php if ($ide_per != -1){?>
                <a href=<?php echo base_url() . "admin.php/rpt_contado/inicio/".$ide_per ?>>Ir Pago Contado</a>
                <?php }?>

            </div>
            
                
        </div>
        


<!--        <label class="control-label" for="textarea">Ingrese la Busqueda:</label>
        <input type="text" class="input-medium search-query" name="txtsearch">
        <select id="select02"  name="tipo_busqueda" class="span2">
            <option value="1">CEDULA</option>
            <option value="2">APELLIDO</option>
            <option value="3">NOMBRE</option>
        </select>
        <button type="submit" class="btn" <?php echo (($ide_per == -1) ? "disabled " : " "); ?>>Buscar</button>
-->
    </form> 

</div>

<?php if (!empty($inscritos)) { ?>
<div class="tabbable"> <!-- Only required for left/right tabs -->
  <ul class="nav nav-tabs">
    <li class="active"><a href="#tab1" data-toggle="tab">Adeudan Coutas</a></li>
    <li><a href="#tab2" data-toggle="tab">Otros</a></li>
  </ul>
  <div class="tab-content">
    <div class="tab-pane active" id="tab1">
    <div id="tabla" >
        <h3>LISTADO DE ESTUDIANTES QUE ADEUDAN</h3>
        <table id="example" class="table table-bordered table-striped table-condensed">
            <thead>
                <tr>
                    <th>CEDULA </th>
                    <th>APELLIDOS</th>
                    <th>NOMBRES</th>
                    <th>VALOR</th>
                    <th>TIPO</th>
                    <th>CUOTAS</th>
                    <th>PAGA</th>
                    <th>Acciones</th>
                </tr>
            </thead>
            <tbody>
                <?php
                foreach ($inscritos as $i => $row) {
                    ?>
                    <tr>

                        <td><a href="<?php echo base_url() . "admin.php/coutas/presentardatos/". $row['id_matr'] ?>"><?php echo $row['cedula_pers'] ?></a></td>
                        <td><?php echo $row['apellido_pers'] ?></td>
                        <td><?php echo $row['nombre_pers'] ?></td>
                        <td><?php echo $row['valor_financiar'] ?></td>
                        <td><?php echo ($row['tabla_plan']==1?"SEMESTRE":
                                ($row['tabla_plan']==2?"ARRASTRE":"PROCESO TITULACION")) ?></td>
                        <td><?php echo $row['nro_cuotas_plan'] ?></td>
                        <td><?php echo $row['nro_coutas_canc'] ?></td>
                        <td>
                            <?php
                                  echo "<a href='".base_url(). "admin.php/coutas/procesar/" . $row['id_matr'].
                                      "'><i class='icon-edit'></i>PAGAR</a>";
                                  ?>
                        </td>


                    </tr>
                    <?php
                }
                ?>
            </tbody>
        </table>        
    </div>            </div>
    <div class="tab-pane" id="tab2">
<div id="tablamatriculai" >
        <table id="example1" class="table table-bordered table-striped table-condensed">
            
            <thead>
                <tr>
                    <th>Nr</th>
                    <th>CEDULA</th>
                    <th>APELLIDO</th>
                    <th>NOMBRE</th>
                    <th>CARRERA</th>
                    <th>CICLO</th>
                    <th>SEC</th>
                    <th>VALOR</th>
                    
                </tr>
            </thead>
            <tbody>
                <?php
                $fila=1;
                $id_matr="";
                if (!empty($reporte)) {
                    foreach ($reporte as $i => $repor) {
                     if ($id_matr!=$repor['id_matr']){
                        $id_matr=$repor['id_matr'];
                    ?>
                       
                        <tr>
                            <td> <?php echo $fila; ?>
                                </td>
                            <td><a href="<?php echo base_url() . "admin.php/coutas/presentardatos/". $repor['id_matr'] ?>"><?php echo $repor['cedula_pers'] ?></a></td>
                            <td><?php echo $repor['apellido_pers'] ?></td>
                            <td><?php echo $repor['nombre_pers'] ?></td>
                            <td><?php echo $repor['nombre_car'] ?></td>
                            <td><?php 
                                echo ($repor['modo_mat']==3?"CONVALIDACION":($repor['modo_mat']==4?"ARRASTRE":$repor['nombre_cic'])) ?>
                            </td>
                            <td><?php echo ($repor['seccion']==1?"D":($repor['seccion']==2?"N":"FS"));?></td>
                            <td><?php echo (isset($repor['monto_canc_matr'])?$repor['monto_canc_matr']:"beca");?></td>
                            
                        </tr>
                        <?php
                        $fila+=1;
                    }
                    }
                }
                ?>
            </tbody>
        </table>  
    </div>
    </div>
  </div>
</div>





<?php } ?>



